package com.test;

public class StartAndRun {
	
	public static void main(String[] args) {
		System.out.println(Thread.currentThread().getName());
		Thread startThread = new Thread(new MyThread());  
        Thread runThread = new Thread(new MyThread());  
  
        System.out.println("22222222");
        startThread.start(); // calling start method of Thread - will execute in  
             
        // new Thread  
        System.out.println("1111111111");
        runThread.run();
		System.out.println("AAAAAAA");
	}
}

class MyThread implements Runnable{
	@Override
	public void run() {
		System.out.println("in time"); 
	}
	
}